package org.openlab.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "RDM")
public class RDM extends BaseEntity {
	private static final long serialVersionUID = 4272821043138079601L;
	
	@Id
	private long id;	
	@Column(nullable = false)
	private String name;
	@Column(nullable = false)
	private String description;
	
	private RDMType type;
	
	@Column(nullable = false)
	public String getRdmType() {
		return type.toString();
	}
	
	public static RDM newRDM(RDMType type, String name, String description) {
		RDM rdm = new RDM();
		rdm.setType(type);
		rdm.setName(name);
		rdm.setDescription(description);
		return rdm;
	}
	
	public static void main(String[] args) {
		
	}
}
